#!/bin/bash
echo "进入工作目录"
cd ~/bilibili
echo "删除缓存"
supervisorctl stop all
killall -9 ffmpeg
rm -rf push
rm -rf keep1
rm -rf keep2
mkfifo push
mkfifo keep1
mkfifo keep2
rm -rf static-file
echo "拉取最新代码"
git clone https://gitee.com/showurl/static-file.git && \
rm -rf playlist.txt.bak
rm -rf send.sh
rm -rf push.sh
rm -rf resend.sh
rm -rf /etc/supervisord.d/bilibili.ini
mv playlist.txt playlist.txt.bak
mv static-file/bilibili/playlist.txt .
mv static-file/bilibili/send.sh .
mv static-file/bilibili/push.sh .
mv static-file/bilibili/resend.sh .
mv static-file/bilibili/bilibili.ini /etc/supervisord.d/bilibili.ini
chmod +x send.sh
chmod +x push.sh
chmod +x resend.sh
supervisorctl start all
supervisorctl status